package base.core.util;

import org.springframework.util.NumberUtils;

/**
 * Pengwei
 * 2022/5/17 02:03
 */
public class Numbers {

    public static <T extends Number> T parseNumber(String text, Class<T> targetClass) {

        try {
            return NumberUtils.parseNumber(text, targetClass);
        } catch (Exception e) {
        }
        return null;
    }
}
